<?php
class Myblog_Form_Subscribe extends Zend_Form{

public $formDecorators=array(
        array('FormElements'),
        array('Form'),
    );
public $buttonDecorators=array(
        array('ViewHelper'),
        array('Label'),
        array('HtmlTag',array('tag'=>'span','tag'=>'span','id'=>'subscribesubmit'))
);
public $inputDecorators=array(
        array('ViewHelper'),
        array('Label'),
        array('Errors'),
        array('HtmlTag',array('tag'=>'span','tag'=>'span')));

    public function init(){

        $this->setAction('http://feedburner.google.com/fb/a/mailverify')
            ->setMethod('POST')
            ->setAttrib('name','subscribeform')
            ->setAttrib('target','popupwindow')
            ->setAttrib('onsubmit',"window.open('http://feedburner.google.com/fb/a/mailverify?uri=http/itdocskz/rss', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true")
            ->setAttrib('style','height:80px')
            ->setDecorators($this->formDecorators);

        $this->addElements(array(

                                new Zend_Form_Element_Text('email',array(
                                                                        'label'=>'Ваш Email:',
                                                                        'required'=>true,
                                                                        'size'=>'14',
                                                                        'style'=>'margin:10px 10px 10px 0;',
                                                                        'validators'=>array(array('EmailAddress'),
                                                                        array('StringLength',true,array(6,20))),
                                                                        'filters'=>array(
                                                                            array('StripTags')
                                                                        ),
                                                                        'decorators'=>$this->inputDecorators
                                                                   )),
                                $uri = new Zend_Form_Element_Hidden('uri',array(
                                                                        'value'=>'http/itdocskz/rss'
                                                                        //validators filters
                                                                   )),
                                $loc = new Zend_Form_Element_Hidden('loc',array(
                                                                        'value'=>'ru_RU'
                                                                        //validators filters
                                                                   )),
                                $sub =  new Zend_Form_Element_Submit('submit',array(
                                                                            'label'=>'Подписаться',
                                                                           'value'=>'Subscribe',
                                                                           'class'=>'btn btn-success',
                                                                           'decorators'=>$this->buttonDecorators
                                                                      ))
                                ));
                                $sub->removeDecorator('Label');
                                $uri->removeDecorator('Label');
                                $loc->removeDecorator('Label');
    }
}